home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 October: Mac OS SDK / Dev.CD Oct 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / CIncludes / Patches.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-12  |  4.3 KB  |  160 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        Patches.h
  3.  
  4.      Contains:    Patch Manager Interfaces.
  5.  
  6.      Version:    Technology:    System 8
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. */
  18.  
  19. #ifndef __PATCHES__
  20. #define __PATCHES__
  21.  
  22. #ifndef __TYPES__
  23. #include <Types.h>
  24. #endif
  25.  
  26.  
  27.  
  28. #if PRAGMA_ONCE
  29. #pragma once
  30. #endif
  31.  
  32. #ifdef __cplusplus
  33. extern "C" {
  34. #endif
  35.  
  36. #if PRAGMA_IMPORT
  37. #pragma import on
  38. #endif
  39.  
  40. #if PRAGMA_STRUCT_ALIGN
  41.     #pragma options align=mac68k
  42. #elif PRAGMA_STRUCT_PACKPUSH
  43.     #pragma pack(push, 2)
  44. #elif PRAGMA_STRUCT_PACK
  45.     #pragma pack(2)
  46. #endif
  47.  
  48. #if TARGET_OS_MAC
  49.  
  50. enum {
  51.     kOSTrapType                    = 0,
  52.     kToolboxTrapType            = 1
  53. };
  54.  
  55. typedef SignedByte                         TrapType;
  56.  
  57. enum {
  58.     OSTrap                        = kOSTrapType,                    /* old name */
  59.     ToolTrap                    = kToolboxTrapType                /* old name */
  60. };
  61.  
  62. /*
  63.     GetTrapAddress and SetTrapAddress are obsolete and should not
  64.     be used. Always use NGetTrapAddress and NSetTrapAddress instead.
  65.     The old routines will not be supported for PowerPC apps.
  66. */
  67. #if OLDROUTINENAMES && !TARGET_RT_MAC_CFM
  68.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  69.                                                                                             #pragma parameter __A0 GetTrapAddress(__D0)
  70.                                                                                             #endif
  71. EXTERN_API( UniversalProcPtr )
  72. GetTrapAddress                    (UInt16                 trapNum)                            ONEWORDINLINE(0xA146);
  73.  
  74.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  75.                                                                                             #pragma parameter SetTrapAddress(__A0, __D0)
  76.                                                                                             #endif
  77. EXTERN_API( void )
  78. SetTrapAddress                    (UniversalProcPtr         trapAddr,
  79.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA047);
  80.  
  81. #endif  /* OLDROUTINENAMES &&  !TARGET_RT_MAC_CFM */
  82.  
  83. EXTERN_API( UniversalProcPtr )
  84. NGetTrapAddress                    (UInt16                 trapNum,
  85.                                  TrapType                 tTyp);
  86.  
  87. EXTERN_API( void )
  88. NSetTrapAddress                    (UniversalProcPtr         trapAddr,
  89.                                  UInt16                 trapNum,
  90.                                  TrapType                 tTyp);
  91.  
  92.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  93.                                                                                             #pragma parameter __A0 GetOSTrapAddress(__D0)
  94.                                                                                             #endif
  95. EXTERN_API( UniversalProcPtr )
  96. GetOSTrapAddress                (UInt16                 trapNum)                            ONEWORDINLINE(0xA346);
  97.  
  98.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  99.                                                                                             #pragma parameter SetOSTrapAddress(__A0, __D0)
  100.                                                                                             #endif
  101. EXTERN_API( void )
  102. SetOSTrapAddress                (UniversalProcPtr         trapAddr,
  103.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA247);
  104.  
  105.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  106.                                                                                             #pragma parameter __A0 GetToolTrapAddress(__D0)
  107.                                                                                             #endif
  108. EXTERN_API( UniversalProcPtr )
  109. GetToolTrapAddress                (UInt16                 trapNum)                            ONEWORDINLINE(0xA746);
  110.  
  111.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  112.                                                                                             #pragma parameter SetToolTrapAddress(__A0, __D0)
  113.                                                                                             #endif
  114. EXTERN_API( void )
  115. SetToolTrapAddress                (UniversalProcPtr         trapAddr,
  116.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA647);
  117.  
  118.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  119.                                                                                             #pragma parameter __A0 GetToolboxTrapAddress(__D0)
  120.                                                                                             #endif
  121. EXTERN_API( UniversalProcPtr )
  122. GetToolboxTrapAddress            (UInt16                 trapNum)                            ONEWORDINLINE(0xA746);
  123.  
  124.                                                                                             #if TARGET_OS_MAC && TARGET_CPU_68K && !TARGET_RT_MAC_CFM
  125.                                                                                             #pragma parameter SetToolboxTrapAddress(__A0, __D0)
  126.                                                                                             #endif
  127. EXTERN_API( void )
  128. SetToolboxTrapAddress            (UniversalProcPtr         trapAddr,
  129.                                  UInt16                 trapNum)                            ONEWORDINLINE(0xA647);
  130.  
  131. #if TARGET_CPU_PPC
  132. EXTERN_API( UniversalProcHandle )
  133. GetTrapVector                    (UInt16                 trapNumber);
  134.  
  135. #endif  /* TARGET_CPU_PPC */
  136.  
  137. #endif  /* TARGET_OS_MAC */
  138.  
  139.  
  140. #if PRAGMA_STRUCT_ALIGN
  141.     #pragma options align=reset
  142. #elif PRAGMA_STRUCT_PACKPUSH
  143.     #pragma pack(pop)
  144. #elif PRAGMA_STRUCT_PACK
  145.     #pragma pack()
  146. #endif
  147.  
  148. #ifdef PRAGMA_IMPORT_OFF
  149. #pragma import off
  150. #elif PRAGMA_IMPORT
  151. #pragma import reset
  152. #endif
  153.  
  154. #ifdef __cplusplus
  155. }
  156. #endif
  157.  
  158. #endif /* __PATCHES__ */
  159.  
  160.